$(document).ready(function(){
	$("#bootbox-resetPassword").click(function(){
		var id = $(".row_checked").find("input[name='idField_select']").val();
		var url = $("#bootbox-resetPassword").attr("url");
		if(id == undefined || id == ""){
			$btools.alert("请选择一名用户！");
		}else{
			$btools.prompt("确认重置当前用户密码为123456？",function(){
				$btools.blockUI({
					msg : "正在重置密码，请稍候..."
				});
				var mId = {"mId":id};
				$.ajax({
					cache : true,
					// async: false,
					type : "POST",
					url : url,
					data : mId,
					error : function(
							request) {
						$btools.alert("请求出错，与服务器失去连接",function() {
							$btools.unblockUI();// 隐藏加载提示框
						});
						return;
					},
					success : function(
							data) {
						$btools.unblockUI();// 隐藏加载提示框
						var msg = data.result["msg"];
						var shortCutFunction = "info";
						if(data.code=="true"){
							shortCutFunction = "success";
						}else if(data.code=="false"){
							shortCutFunction = "error";
						}else if(data.code=="error"){
							shortCutFunction = "error";
						}
						$btools.showToast({
							msg : msg,
							shortCutFunction : shortCutFunction
						});
					}
				});
				
			});
		}
	});
})